package org.dromara.book.domain.bo;

import org.dromara.book.domain.SzlyReaderType;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 读者类型业务对象 szly_reader_type
 *
 * @author LionLi
 * @date 2024-03-20
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SzlyReaderType.class, reverseConvertGenerate = false)
public class SzlyReaderTypeBo extends BaseEntity {

    /**
     * 序号
     */
    @NotNull(message = "序号不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 类型名称
     */
    @NotBlank(message = "类型名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 可借阅总量
     */
    @NotNull(message = "可借阅总量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer borrowNum;

    /**
     * 可借阅天数
     */
    @NotNull(message = "可借阅天数不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer borrowLimit;

    /**
     * 可预借
     */
    @NotNull(message = "可预借不能为空", groups = { AddGroup.class, EditGroup.class })
    private Boolean ifAdvance;

    /**
     * 预借量
     */
    @NotNull(message = "预借量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer advanceNum;

    /**
     * 预借天数
     */
    @NotNull(message = "预借天数不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer advanceLimit;

    /**
     * 可续借
     */
    @NotNull(message = "可续借不能为空", groups = { AddGroup.class, EditGroup.class })
    private Boolean ifRenew;

    /**
     * 续借数量
     */
    @NotNull(message = "续借数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer renewNum;

    /**
     * 续借天数
     */
    @NotNull(message = "续借天数不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer renewLimit;

    /**
     * 描述信息
     */
    @NotBlank(message = "描述信息不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remark;


}
